const Router = require('koa-router');
const router = new Router();
const {db, Op, QueryTypes} = require("../../models/db");


router.post('/common/getOne', async ctx => {
    let sql = ctx.request.body.sql
    if(sql) {
        let list = await db.query(sql, {type: QueryTypes.SELECT, plain: true} )
        return ctx.suc('', list)
    }
    else {
        return ctx.err('没有查询方法')
    }
})







module.exports = router;